<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>添加评论</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
    <link href="../bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
    <style type="text/css">
    .container{
    width:300px;
    }  
    </style>
<script type="text/javascript" src="../jquery/jquery-1.6.1.js"></script>
<script type="text/javascript">
$(function(){
	$("#ok").click(function(){
	var level=$("input:checked");
	var container=$("#container").val();
	if(level.size()<1){
	$("#msg").html("请选择评价等级");
	}
	
	else if(container==""){
	 $("#msg").html("请输入具体内容 ");
	}
    else $("#form").submit();
	
	})
})


</script>
  </head>
  <body>
  <%
  

   %>
<div class="container">
<form class="form-signin" id="form" action="../action/websiteAction/addReview.jsp" method="post">
<input type="hidden" name="orderid" value='<%=Integer.parseInt(request.getParameter("orderid"))%>'/>
<h2 class="form-signin-heading">请填写评论</h2>
<br>
评价等级：
<br/>
<label class="radio inline">
<input type="radio" name="level"  value="1" >
好评
</label>
<label class="radio inline">
<input type="radio" name="level" value="2">
中评
</label>
<label class="radio inline">
<input type="radio" name="level" value="3">
差评
</label>
<br/>
<br/>
评论具体内容：
<br/>
<textarea rows="3" cols="100" id="container" name="container"></textarea>
<br/>
<button class="btn btn-large btn-primary" type="button" id="ok">提交</button>&nbsp;&nbsp;&nbsp;<button class="btn btn-large btn-primary" type="reset">重置</button>
</form>
    <center> <span id="msg" style="color:red;font-size:20px;"></span></center>
    
    </div>
    <script src="../bootstrap/js/bootstrap.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
  </body>
</html>
